package com.canyou.system.entity.dept;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 部门新增编辑模型
 *
 * @author fy
 * @date 2021/5/18 11:31
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "DeptDTO", description = "部门新增编辑模型")
public class DeptDTO {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "所属公司id")
    @NotNull(message = "所属公司id不能为空")
    private Long orgId;

    @ApiModelProperty(value = "上级部门id")
    @NotNull(message = "上级部门id不能为空")
    private Long parentId;

    @ApiModelProperty("部门名称")
    @NotBlank(message = "部门名称不能为空")
    private String deptName;

    @ApiModelProperty("排序")
    private Integer sort;

}
